﻿using System;
using System.Collections.Generic;


namespace DailyFx
{

	public interface ITimeSeries<VarType> : ISeries<VarType>
		where VarType : struct, IVariant, ITick
	{

		/// <summary>
		///		Checks if contains specified time stamp .
		/// </summary>
		Boolean HasTick ( DateTime tick );

		/// <summary>
		///		Gets time stamp at specified index 
		/// </summary>
		DateTime GetTick ( Int32 index );

		/// <summary>
		///		Gets index(if exists) at or index right supposed to be at (if not exists),
		///		 By specified time stamp . 
		/// </summary>
		Int32 GetRadix ( DateTime tick );


		/// <summary>
		///     Get the item at specified time stamp .
		/// </summary>
		VarType this [ DateTime tick ] { get; set; }

		/// <summary>
		///     Gets field value at specified time point and field name .
		/// </summary>
		Decimal this [ DateTime tick, Int32 field ] { get; }
	}
}
